//
//  ESAsyncTimer.h
//  SportsGather
//
//  Created by 付有芳 on 15/9/7.
//  Copyright (c) 2015年 Egymcom. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@class ESAsyncTimer;

@protocol ESAsyncTimerDelegate <NSObject>

- (void)doUpdate:(ESAsyncTimer *)asyncTimer;

@end

@interface ESAsyncTimer : NSObject

@property (weak, nonatomic) id<ESAsyncTimerDelegate> delegate;
/** 时间间隔 */
@property (nonatomic,assign) CGFloat timeInterval;
/** 是否正在运行 */
@property (atomic) BOOL isRunning;

- (instancetype)initWithTimeInterval:(CGFloat)timeInterval;

- (void)startTimer;
- (void)stopTimer;

@end


